package com.caiyigo.baihua.Const;

import java.util.HashMap;
import java.util.Map;

public class UrlConfig {

	public static final String LOGIN = "/loginView";
	public static final String BASE = "/page";

	// 子模块

	public static final String LAYOUT = BASE + "/layout";

	public static final String SYSTEM_DB = BASE + "/system/db";
	public static final String ERROR = BASE + "/error";
	public static final String PUSH = BASE + "/push";

	public static final String VIEW_ERROR_401 = ERROR + "/401.html";

	public static final class SYSTEM {
		public static final String BASE = "page/system/";
		public static final String RES = BASE + "res";
		public static final String ROLE = BASE + "role";
		public static final String USER = BASE + "user";
		public static final String LOG = BASE + "log";
		public static final String ROLEGRANT = BASE + "roleGrant";
	}

	public static final class INDEX {
		public static final String BASE = "page/index/";
		public static final String INDEX = BASE + "index";

	}

	public static final class COMMON {
		public static final String BASE = "page/common/";
		public static final String LOGIN = BASE + "login";
		public static final String JUMP = BASE + "jump";

	}

	public static final class BUSINESS {
		public static final String BASE = "page/business/";
		public static final String XUESHENG = BASE + "xuesheng";
		public static final String ZHUANYE = BASE + "zhuanye";
		public static final String KAOSHIZW = BASE + "kaoshizw";
		public static final String KAOSHICJ = BASE + "kaoshicj";


		public static final String ZYKM = BASE + "zykm";

		public static final String KAOSHIKEMU = BASE + "kaoshikemu";

	}

	// 基于ACTION约定，URL含有下列字符时将记录操作参数
	// data:[ {
	// operation: '1',
	// value:'访问'
	// },{
	// operation:'2' ,
	// value:'登录'
	// },{
	// operation:'3' ,
	// value:'添加事件'
	// },{
	// operation:'4' ,
	// value:'编辑事件'
	// },{
	// operation:'5' ,
	// value:'删除事件'
	// },{
	// operation:'6' ,
	// value:'授权事件'
	// }]
	private static Map<String, Integer> logFiledMap = new HashMap<String, Integer>();
	// 加入这个东西，拦截器过滤时直接跳过
	private static Map<String, String> staticResourceMap = new HashMap<String, String>();
	static {
		logFiledMap.put("add", 3);
		logFiledMap.put("edit", 4);
		logFiledMap.put("delete", 5);
		logFiledMap.put("grant", 6);
		logFiledMap.put("batchDelete", 5);
		logFiledMap.put("batchGrant", 6);

		staticResourceMap.put("css", "css");
		staticResourceMap.put("js", "js");
		staticResourceMap.put("jpg", "jpg");
		staticResourceMap.put("png", "png");
	}

	public static Map<String, Integer> getLogFiledMap() {
		return logFiledMap;
	}

	public static Map<String, String> getStaticResourceMap() {
		return staticResourceMap;
	}

}
